<style scoped>
  .p1,.p2,.Result{
    text-align: right;
  }
  .add{
    padding-left: 20px;
    font-size: 50px;
  }
  .Result{
    padding-top: 30px;
  }
  .p1 li,.p2 li,.Result li{
    width: 50px;
    line-height: 50px;
    display: inline-block;
    border: 1px solid #ccc;
    text-align: center;
    margin-left: 10px;
  }
  .active{
    background: #609bf7;
  }
</style>
<template>
  <div>
    <div class="p1">
      <ul>
        <li v-for="(i,$index) in set_number_info[0]"  v-text="i.number"
            v-if="i.number!=''"
            @click="remove(i,$index,0)"
            :class="{active:i.start==1}"
        ></li>
      </ul>
    </div>
    <p class="add">+</p>
    <div class="p2">
      <ul>
        <li v-for="(i,$index) in set_number_info[1]" v-text="i.number"
            @click="remove(i,$index,1)"
            :class="{active:i.start==1}"
            v-if="i.number!=''"
        ></li>
      </ul>
    </div>
    <hr/>
    <div class="Result">
      <ul>
        <li v-for="(i,$index) in set_number_info[2]" v-text="i.number"
            @click="remove(i,$index,2)"
            :class="{active:i.start==1}"
            v-if="i.number!=''"
        ></li>
      </ul>
    </div>
  </div>
</template>
<script type="es6">
  export default{
    data (){
      return {}
    },
    computed: {
      set_number_info (){
        return this.$store.state.modulesIndex.set_number_info
      }
    },
    methods: {
      remove(number, index, t){
        if (t == 0) {

            if(this.set_number_info[1][index].start!=1&&this.set_number_info[2][index].start!=1){
              this.$store.commit('add_active',[t,index])
            }
        }
        if (t == 1) {
          if(this.set_number_info[0][index].start!=1&&this.set_number_info[2][index].start!=1){
            this.$store.commit('add_active',[t,index])
          }
        }
        if (t == 2) {
          if(this.set_number_info[0][index].start!=1&&this.set_number_info[1][index].start!=1){
            this.$store.commit('add_active',[t,index])
          }

        }
      }
    }
  }
</script>
